{% set liveLesson = data('BeginningLiveLesson', {afterSecond:1800}) %}
{% if liveLesson %}
<div id="liveCourseGuide" data-time='{{((liveLesson.startTime-timestamp())/60)|number_format}}' data-lesson-id='{{liveLesson.id}}' style="display:none">
  <div id="liveCourseGuideModal" class="modal fade in" role="dialog" >
    <div class="modal-dialog modal-live-remind">
      <div class="modal-content">
        <div class="modal-body">
          <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
          <div class="well">
            <div class="media media-course-module">
              <div class="media-left">
                <a href=""><img src="{{ filepath(liveLesson.course.largePicture, 'course.png') }}" alt="{{liveLesson.course.title}}"></a>
              </div>
              <div class="media-body">
                <h4>{{liveLesson.course.title}}</h4>
                <p>授课老师: 
                  {% for teacher in liveLesson.teachers %}
                    {{teacher.nickname}} &nbsp;
                  {% endfor %}
                </p>
                <p>直播时间: {{liveLesson.startTime|date('H:i')}}～{{liveLesson.endTime|date('H:i')}}</p>
              </div>
            </div>
          </div>
          <div class="live-countdown">
            距离直播还有<span>{{((liveLesson.startTime-timestamp())/60)|number_format}}</span>分钟
          </div>
          <div class="text-center">
            <a href="{{path('live_course_play', {courseId:liveLesson.courseId, lessonId:liveLesson.id})}}" class="btn btn-warning btn-lg" target="_blank">
              <i class="es-icon es-icon-zhibokecheng2"></i>
              进入直播教室
            </a>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
{% do load_script('default/live-course-guide') %}
{% endif %}